import { useGetCounterQuery, useSetCounterMutation } from "@/services/counter";

function Test() {
  const { data, isFetching } = useGetCounterQuery({});
  const [setCounter] = useSetCounterMutation();
  console.log("data:");
  console.log(data);
  console.log("isFetching:");
  console.log(isFetching);
  return (
    <div>
      <h2>Test 测试</h2>
      <p>{isFetching ? "loading... ..." : ""}</p>
      <span onClick={() => setCounter(100)}>setCounter</span>
    </div>
  );
}

export default Test;
